Skip to content

[MRG] Stabilize simplex projection against large common offsets - #880

Open
AHMETHAKANBEZIR1 wants to merge 6 commits into
PythonOT:masterfrom
AHMETHAKANBEZIR1:fix/simplex-translation-stability
Open

AHMETHAKANBEZIR1 wants to merge 6 commits into
PythonOT:masterfrom
AHMETHAKANBEZIR1:fix/simplex-translation-stability

Conversation

@AHMETHAKANBEZIR1

@AHMETHAKANBEZIR1 AHMETHAKANBEZIR1 commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Fixes #879. Simplex projection is invariant to a common offset per column. Center floating inputs before sorting and thresholding so large equal float32/float64 inputs retain unit mass rather than producing all zeros. Integer inputs retain their existing path. This does not change sparse-projection handling or validation for nonpositive simplex radii.

Validation

Current head 38faa64 includes master 0b6f8d5. The only merge conflict was RELEASES.md; both entries were retained. The PR production and regression files are unchanged from the previous head.

  • Full utility module and doctests: NumPy 124 passed; NumPy/PyTorch 2.9.1 CPU 190 passed; NumPy/TensorFlow 158 passed, 32 existing skips, one median-detachment warning. Each process verifies its actual backends and source checkout; Torch and TensorFlow run separately.
  • The regressions use analytic simplex values, ordinary-range controls and the tangent-space gradient reference. Earlier original-function runs reproduced eight failures and twelve controls across NumPy and PyTorch; those are historical baseline checks, not new runs on this update.
  • All applicable configured pre-commit hooks for the PR files and diff checks pass.

Windows/Python 3.12.14. Existing native POT extensions were reused; the upstream changes touch no native extension source. No new full-package, local full documentation/gallery, GPU, JAX, CuPy or compilation validation is claimed. Historical focused API documentation passed; current-head upstream checks are pending.

Contribution disclosure

Prepared, investigated and tested autonomously by OpenAI Codex on behalf of AHMETHAKANBEZIR1. No independent human review has been performed.

Co-authored-by: Codex <noreply@openai.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proj_simplex loses the simplex mass with large common floating-point offsets

1 participant